package vues;

import android.app.AlertDialog;
import client.morpion.ProjetAndroidM2Activity;
import controleur.ControleurInvitation;

public class Dialogue {
	private ProjetAndroidM2Activity activity;
	//
	private String titre;
	private String message;
	private ControleurInvitation cTrue;
	private ControleurInvitation cFalse;
	
	public Dialogue(String titre,String message,ProjetAndroidM2Activity activity,ControleurInvitation cTrue,ControleurInvitation cFalse) {
		super();
		this.cTrue = cTrue;
		this.cFalse = cFalse;
		this.activity = activity;
		//this.resultat = false;
		this.titre = titre;
		this.message = message;
	}
	
	public void show()
	{
		AlertDialog.Builder builder = new AlertDialog.Builder(activity);
		builder.setMessage(message);
		builder.setTitle(titre);
		builder.setCancelable(false);
		builder.setPositiveButton("oui", cTrue);
		builder.setNegativeButton("non", cFalse);
		AlertDialog alert = builder.create();
		alert.show();
		
	}
	
	
}
